package continuity;

/**
 * Zetor csapat szekelton
 * 
 * A program célja hogy a modellről eldönthető legyen, hogy a feladat egy helyes
 * megoldását nyújtja.
 * 
 * @author Balogh Peter Tamas
 * @author Gál István László
 * @author Kárász Gábor
 * @author Simon Endre András
 * @author Szabó Alex
 */
public class Wall implements Sprite {

    private Point3d position;
    private int width;
    private int height;
    /**
     * 
     */
    static public String className = "Wall";
    /**
     * 
     */
    public String name;

    /**
     * 
     * @param pos
     * @param w
     * @param h
     */
    public Wall(Point3d pos, int w, int h, String n) {
        name = n;
    }

    /**
     * 
     */
    @Override
    public void getPosition() {
        String classInfo = name + "(" + className + ")::getPosition(): Point3d";
        Continuity.methodEntry(classInfo);
        Continuity.methodExit(classInfo);
        Continuity.methodVoid();
    }

    /**
     * 
     * @param S
     */
    @Override
    public void checkHit(Sprite s) {
        String classInfo = name + "(" + className + ")::checkHit(Sprite s): void";
        Continuity.methodEntry(classInfo);

        if (Continuity.Question("Van utkozes?", 'y', 'n')) {
            Continuity.Alt("Volt utkozes");
            Continuity.methodReturn(s.getType(), s.getName(), className, name, "true");
            Continuity.AltEnd();
        } else {
            Continuity.Alt("Nem volt utkozes");
            Continuity.methodReturn(s.getType(), (s).getName(), className, name, "false");
            Continuity.AltEnd();
        }
        Continuity.methodExit(classInfo);
    }

    /**
     * 
     */
    @Override
    public void getWidth() {
        String classInfo = name + "(" + className + ")::getWidth(LevelItem i): int";
        Continuity.methodEntry(classInfo);
        Continuity.methodExit(classInfo);
        Continuity.methodVoid();
    }

    /**
     * 
     */
    @Override
    public void getHeight() {
        String classInfo = name + "(" + className + ")::getHeight(): int";
        Continuity.methodEntry(classInfo);
        Continuity.methodExit(classInfo);
        Continuity.methodVoid();
    }

    /**
     * 
     * @return
     */
    public String getType() {
        return className;
    }

    /**
     * 
     * @return
     */
    @Override
    public String getName() {
        return name;
    }
}
